Title Banner


Technotes


Download

Acrobat file (111K)
Download

ClarisWorks 4 file (41K)
QuickView version

not available yet

T E C H N O T E : Writing PPD Files for Use With LaserWriter 8, version 8.4.1


Technote 1068
September 1996


By Dave Polaschek
dpolasch@apple.com
Apple Developer Technical Support (DTS)

LaserWriter 8.4 offers a new graphical way to customize the interface presented to the user for selecting printer-specific options that are defined in PostScript Printer Description (PPD) files. This Technote describes how to access those features.

This Technote assumes you are already familiar with the PPD specification. If you are not familiar with how to make PPD files, you should first consult the PostScript Printer Description File Format Specification Version 4.3, which is available from Adobe Systems, Inc. (An earlier version of the spec (1865K) is available online at Adobe's Website.)

Resource IDs

Resource IDs must be in the range of driver-owned resources, i.e., -8160 to -4090, but the resources used in your PPD file should be in the ID range of -7500 to -7000 to avoid conflicts with future revisions of the LaserWriter driver.

Icons

The four icon families in the PPD files are optional, but when they are there, the LaserWriter driver and Desktop Printing software will use them to represent a printer setup with that PPD file. Icon family -16455 is the Finder custom icon. Three additional icon families are pointed to by the BNDL resource of the PPD file. The types for these icons are 'dpnn' for the default icon (probably the same as the custom finder icon you provide), 'dpcn' for the selected version of the icon (with a bold border around it), and 'dpna' for the not available version of the icon (the crossed-out version of the icon). Even though Apple uses the IDs -7189, -7188, and -7187 for these icon families, and resource ID -7192 for the 'BNDL' resource, none of these ID numbers are reserved, and developers are encouraged to use them.

Customizing the Panels Within the Print Dialog

The items displayed within the Printer Specific panel of the print dialog are controlled by resources within the PPD file. There are two main resources you need to define: the 'ppdT' and an associated 'DITL' resource. A template for the 'ppdT' resource is contained within the LaserWriter 8.4 driver. The 'ppdT' resource you create needs to have the signature set to 'rbi1' and the version set to 1. The 'DITL' resource must have the same ID as the 'ppdT' resource. Also note that the coordinates within the 'DITL' resource are local to the print dialog, and you have the ability to construct a 'DITL' which would draw items over areas used by the driver. Don't do that. It will be a future compatibility problem.

Adding Items to the 'ppdT' Resource

Once you've created the base resource, you can add items to it. Items are added as follows:

Adding Balloon Help

You can add balloon help to the items described in your DITL in the same way you would for dialog items in an application. You add a help item to the DITL, it points to a 'hdlg' and that gets appended to any already existing balloon help. The only thing to remember is that the PICT controls used by LaserWriter 8 don't actually have multiple states, so you need to write the help string for those items so it covers all the possible cases. For more information on Balloon Help and the 'hdlg' resource, see Inside Macintosh: More Macintosh Toolbox, Chapter 3. Make sure that your help resources are also in the range specified above.

Summary

That's all there's to it. The best examples available are the PPDs supplied with LaserWriter 8.4 for use with Apple printers.

Further Reference

Acknowledgments

Thanks to Steve Simon and Rich Blanchard.


Tech Support
Technotes
Previous Technote | Contents | Next Technote


Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help